import React, { Component } from 'react'

class Footer extends Component {
    render() {
        return (
            <>
                <div style={{ backgroundColor: '#f66', height: '50px' }}>页脚</div>
            </>
        );
    }
}

// 高阶组件 
const Page1 = () => {
    return (
        <>
            <h1>page1 页面</h1>
            <Footer></Footer>
        </>
    )
}

const Page2 = () => {
    return (
        <>
            <h1>page2 页面</h1>
            <Footer></Footer>
        </>
    )
}

export default class App extends Component {
    render() {
        return (
            <>
                <Page1></Page1>
                <hr />
                <hr />
                <hr />
                <Page2></Page2>
            </>
        )
    }
}
